<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>青创云后台</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<link rel="stylesheet" href="bootswatch/4/flatly/bootstrap.css" media="screen">
<link rel="stylesheet" href="bootswatch/_assets/css/custom.min.css">
<!--<link rel="icon" type="image/x-icon" href="http://image.guang.j.cn//bootswatch/favicon.ico">-->
<body>

<div id="demo" class="navbar navbar-expand-lg fixed-top navbar-dark bg-primary" style="background-color: #31c4b1 !important;">

    <div class="container">
        <a href="" class="navbar-brand">青创云后台</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
                aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarResponsive">
            <ul class="navbar-nav">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="ordergoods">订单管理 <span
                            class="caret"></span></a>
                    <div class="dropdown-menu" aria-labelledby="material">
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" target="_blank" href="/html/goods_order/goods_order_list.html">订单列表</a>
                    </div>
                </li>

            </ul>
            <ul class="navbar-nav">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">商品管理 <span
                            class="caret"></span></a>
                    <div class="dropdown-menu" aria-labelledby="material">
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" target="_blank" href="/html/root_goods/root_goods.html">商品标签管理</a>
                        <a class="dropdown-item" target="_blank" href="/html/root_goods/leaf_goods.html">商品子标签列表</a>
                       <!-- <a class="dropdown-item" target="_blank" href="/html/root_goods/tag.html">商品子标签管理</a>-->
                    </div>
                </li>

            </ul>

            <ul class="navbar-nav">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="operator">权限管理 <span
                            class="caret"></span></a>
                    <div class="dropdown-menu" aria-labelledby="material">
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" target="_blank" href="/html/operator/operator.html">用户管理</a>
                        <a class="dropdown-item" target="_blank" href="/html/operator/role.html">角色管理</a>
                        <a class="dropdown-item" target="_blank" href="/html/operator/permission.html">权限管理</a>
                    </div>
                </li>

            </ul>
            <ul class="navbar-nav">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="find">发现<span
                            class="caret"></span></a>
                    <div class="dropdown-menu" aria-labelledby="material">
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" target="_blank" href="/html/find/find.html">资讯</a>
                    </div>
                </li>

            </ul>
            <ul class="nav navbar-nav ml-auto">
                <li class="nav-item">
                    <a class="nav-link">用户名：</a>
                </li>
                <li class="nav-item">
                    <label class="nav-link" id="nickName"></label>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="javascript:void(0)" onclick="logout()">退出</a>
                </li>
            </ul>


        </div>
    </div>


</div>

<script src="bootswatch/_vendor/jquery/dist/jquery.min.js"></script>
<script src="bootswatch/_vendor/popper.js/dist/umd/popper.min.js"></script>
<script src="bootswatch/_vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bootswatch/_assets/js/custom.js"></script>
<script src="resources/js/common/bootstrap3.min.js" type="text/javascript"></script>
<script src="resources/js/common/vue.min.js"></script>
<script src="resources/js/common/common.js"></script>
<script>
    var demo = new Vue({
        el: '#demo',
        data: {
            id: 0,
            nickName: ""

        }, methods: {
            getOperator: function () {
                var t = this;
                var data = executeAjaxByPost('/operator/get_operator_name');
                if (data.retCode == 1) {
                    $("#nickName").html(data.nickName);
                    t.nickName = data.nickName;
                }
            }
        },
        mounted: function () {
            this.getOperator();
        }
    });

    function logout() {
        var data = executeAjaxByPost('/login/logout');
        if (data.retCode == 1) {
            window.location.href = "/login.html";
        }
    }

    function resetPwd() {
        var data = executeAjaxByPost('/login/logout');
        if (data.retCode == 1) {
            window.location.href = "/login.html";
        }
    }


</script>
</body>
</html>